<?php /* Smarty version Smarty-3.1.21-dev, created on 2015-11-03 15:01:23
         compiled from "H:\WebApplication\myconpany\sumi_mobile\application\views\entrust\setpone.html" */ ?>
<?php /*%%SmartyHeaderCode:2442562f2a0a10b4b6-86412856%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '4f1e356b75de7fb378da9263363c4691daa4b69b' => 
    array (
      0 => 'H:\\WebApplication\\myconpany\\sumi_mobile\\application\\views\\entrust\\setpone.html',
      1 => 1446534080,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2442562f2a0a10b4b6-86412856',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.21-dev',
  'unifunc' => 'content_562f2a0a28d419_67658200',
  'variables' => 
  array (
    'conpanyinfo' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_562f2a0a28d419_67658200')) {function content_562f2a0a28d419_67658200($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/header.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!--header stop-->
<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/common/headertitle.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!--header end-->
<section class="box-user">
    <img src="/images/stp1.png" width="100%" class="fl"/>
    <form method="post" target="_self"  name="entrust"  id="entrust" action="/entrust/setptow">
    <div class="purchase2">
        <input class="purchase_w2" type="text" name="business_name" value="<?php if ($_smarty_tpl->tpl_vars['conpanyinfo']->value!='') {
echo $_smarty_tpl->tpl_vars['conpanyinfo']->value['business_name'];
}?>" placeholder="公司名称"/>
        <input class="purchase_w2" type="text" name="mobile" value="<?php if ($_smarty_tpl->tpl_vars['conpanyinfo']->value!='') {
echo $_smarty_tpl->tpl_vars['conpanyinfo']->value['mobile'];
}?>" placeholder="手机号码"/>
        <input class="purchase_w2" type="text" name="contacts" value="<?php if ($_smarty_tpl->tpl_vars['conpanyinfo']->value!='') {
echo $_smarty_tpl->tpl_vars['conpanyinfo']->value['contacts'];
}?>" placeholder="联系人"/>
    </div>
    <div class="purchase1">
        <input class="purchase_w3 btn_em" type="button" value="下一步"/>
    </div>
    </form>
</section>


<?php echo '<script'; ?>
 type="text/javascript">
    $(function(){
        $(function(){
            $('.btn_em').click(function(){
                if(nEmpty($("input[name=business_name]"),'公司名称不能为空！','公司名称太长或太短,请重新输入！','公司名称不能为数字!','公司名称填写正确！')==false||checkSubmitMobil($("input[name=mobile]"))==false||nEmpty($("input[name=contacts]"),'联系人不能为空！','联系人太长或太短,请重新输入!','联系人不能为数字!','联系人填写正确！')==false){
                    return false;
                }else {
                    document.getElementById("entrust").submit();
                }
            });
        })

        function nEmpty(obj,txt1,txt2,txt3,txt4){
            Value = obj.val();
            if(Value==''){
                alert(txt1);
                return false;
            }else if(Value.length<2||Value.length>=20){
                alert(txt2);
                return false;
            }else if(!isNaN(obj.val())){
                alert(txt3);
                return false;
            }else{
                return true;
            }
        }

        function checkSubmitMobil(obj){
            if(obj.val()==""){
                alert("手机号码不能为空！");
                return false;
            }
            if(!obj.val().match(/^(?:13\d|15\d|18\d)\d{5}(\d{3}|\*{3})$/)){
                alert("手机号码格式不正确！请重新输入！");
                return false;
            }else{
                return true;
            }
        }

        $('input[name=business_name]').blur(function(){
            nEmpty($("input[name=business_name]"),'公司名称不能为空！','公司名称太长或太短,请重新输入！','公司名称不能为数字!','公司名称填写正确！');
        });

        $("input[name=contacts]").blur(function(){
            nEmpty($("input[name=contacts]"),'联系人不能为空！','联系人太长或太短,请重新输入!','联系人不能为数字!','联系人填写正确！');
        });

        $("input[name=mobile]").blur(function(){
            checkSubmitMobil($("input[name=mobile]"));
        });
    });
<?php echo '</script'; ?>
>


<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/common/footerlogin.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<?php echo $_smarty_tpl->getSubTemplate ((@constant('APPLICATION_PATH')).("/application/views/footer.html"), $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php }} ?>
